﻿using BCCommon.TMS.Transport;
using BCEntity.TMS.VehicleTransportBusinessConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.VehicleTransportBusinessConfig
{
    /// <summary>
    /// 车辆运输业务配置重写
    /// </summary>
    public interface IVehicleTransportBusinessConfigOverwriteData
    {
        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="transportBusiness">运输业务</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleTransportBusinessConfigViewEntity>, int)> Query(long? agentRecordId, TransportBusinessType? transportBusiness, string provinceCode, string cityCode, string countyCode, int pageIndex, int pageSize);

        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <param name="vehicleTransportBusinessConfigOverwriteId">车辆运输业务配置重写Id</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> GetEntity(int vehicleTransportBusinessConfigOverwriteId);
        /// <summary>
        /// 获取车辆运输业务配置列表(仅供App使用)
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="countyCode">区县编码</param>
        /// <returns></returns>
        Task<IEnumerable<VehicleTransportBusinessConfigViewEntity>> GetList(long agentRecordId, string countyCode);
        /// <summary>
        /// 更新车辆运输业务配置
        /// </summary>
        /// <param name="entity">车辆运输业务配置信息</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> Update(VehicleTransportBusinessConfigOverwriteEntity entity);

        /// <summary>
        /// 获取车辆运输业务配置
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置Id</param>
        /// <param name="provinceCode">省份Code</param>
        /// <param name="cityCode">市Code</param>
        /// <param name="countyCode">发货地县区Code</param>
        /// <param name="transportBusiness">运输业务</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> GetEntity(long agentRecordId, int vehicleTransportBusinessConfigId, string provinceCode, string cityCode, string countyCode, string transportBusiness);

        /// <summary>
        /// 添加车辆运输业务配置重写记录
        /// </summary>
        /// <param name="entity">车辆运输业务配置重写信息</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> Insert(VehicleTransportBusinessConfigOverwriteEntity entity);

        /// <summary>
        /// 根据车辆运输业务配置重写Id 删除车辆运输业务配置重写记录
        /// </summary>
        /// <param name="vehicleTransportBusinessConfigOverwriteId">车辆运输业务配置重写Id</param>
        /// <returns></returns>
        Task<int> DeleteByConfigOverwriteId(int vehicleTransportBusinessConfigOverwriteId);

        /// <summary>
        /// 获取一条车辆运输业务配置重写记录
        /// </summary>
        /// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置Id</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> GetEntityByConfigId(int vehicleTransportBusinessConfigId);

        /// <summary>
        /// 获取一条车辆运输业务配置重写记录
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="transportBusinessType">运输业务类型</param>
        /// <returns></returns>
        Task<VehicleTransportBusinessConfigOverwriteEntity> GetList(long? agentRecordId, string countyCode, TransportBusinessType? transportBusinessType);
    }
}
